Packets in a bitstream are often delineated by the appearance therein of a particular data value, e.g., a particular 8 bit wide (byte or octet) data pattern, which may be termed the "synchronization pattern". When explicit framing signals are not received along with the bitstream, the equipment receiving the bitstream can use the synchronization pattern to identify the start of a packet. Doing so, however, is complicated when the particular data value employed as the synchronization pattern can appear elsewhere within the bits that make up the rest of a packet. Such an appearance may occur a) when the value of the synchronization pattern is not reserved solely for identifying the start of a packet, b) when the bitstream does not have any predefined bit group, e.g., byte alignment, or c) when errors occur in the bitstream. The synchronization process is further complicated by the possibility of the pattern not being received, for example when noise corrupts the signal when the synchronization pattern is being sent.
The "Motion Pictures Expert Group-2" (MPEG-2) international standard, ISO/IEC 13818-1, is an implementation of such a synchronization scheme. Each MPEG-2 transport bitstream packet has a length of 188 bytes, the first of which is the sync-byte, which contains the sync-pattern. The data value used for the sync-pattern is 0.times.47. Thus, a sync-byte, with value of 0.times.47, should appear in the bitstream every 188 bytes. The sync-pattern value, 0.times.47, is not reserved exclusively for the sync-byte, and other bytes within the bitstream may contain this value as well.
According to one prior art technique, each 8 bit pattern of an MPEG-2 bitstream is tested to determine if it is a sync-byte. When a tested group of eight bits matches the sync-pattern, the next 187 eight bit groups are counted as they pass, but they are not tested. Then, the 189th byte is tested to determine if it is also contains the sync-pattern. If so, it is determined that the preceding 188 bytes, i.e., the first found sync-pattern and the counted 187 eight bit groups, were likely to have been a packet. The process is then repeated several (N) times to minimize the chance that the detection of sync-patterns spaced apart by the length of one packet is the result of chance; i.e., that bytes containing the sync-pattern randomly appeared in the bitstream at the correct packet length interval, but were not the actual packet delineating sync-bytes. If ever the 189th 8 bit pattern does not conform to the sync-pattern, the process is restarted.
The appearance in the bitstream of the sync-pattern at a position other than the position of the sync byte is referred to as "sync-byte emulation". In a typical system, the threshold number of sequential occurrences of the sync-pattern at each packet interval, N, may range from 10 to 100, depending upon the likelihood of sync byte emulation, and the degree of confidence required that the correct determination has been made. The likelihood of sync byte emulation is a function of the value chosen as the sync pattern. In formulating a format for a communication system, if the data content has a predictable frequency of occurrence distribution, the least likely to occur data pattern is chosen as the synchronization pattern. In a worst case scenario, wherein the data content is random and uniformly distributed, any pattern may be selected and the likelihood of the synchronization pattern appearing in a data byte would be one out of the total number of possible data patterns. In such a scenario, the likelihood of N sequential occurrences of sync-byte emulation, i.e. the likelihood of erroneously declaring that synchronization has been achieved, is one out of the total number of possible data patterns raised to the Nth power. A relatively small value of N can result in a very high degree of confidence in the result. Even with a small N, however, the prior art technique cannot be guaranteed to achieve synchronization in a finite period of time.
In applications where there is sync-byte emulation, the prior art technique may be slow to determine that a packet has been received. And, in the presence of noise or other factors which cause the true sync-byte to contain a value other than the sync-pattern, the process is restarted, further delaying the establishment of synchronization. During this period of synchronization to determine the true start of a packet, the data within the packets are lost. This loss of time, and data, is incurred each time the system undergoes the synchronization process: during the initial establishment of communication, and after each loss of synchronization caused by noise or other sources of errors.